<el-main>
    <el-row :gutter="10" type="flex">
        <el-form ref="form" :model="form" :rules="rules" label-width="120px">
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="申请日期" prop="GWEDDOCDATE">
                    <el-date-picker
                            type="date"
                            v-model="form.GWEDDOCDATE"
                            value-format="yyyy-MM-dd"
                            style="width: 100%">
                    </el-date-picker>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="客户" prop="GWED004">
                    <el-input v-model="form.GWED004_NAME" readonly clearable @clear="clearGwed004">
                        <i class="el-icon-search el-input__icon" @click="openGwakPage" slot="suffix"></i>
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="申请单号" prop="GWEDDOCNO">
                    <el-input v-model="form.GWEDDOCNO" readonly></el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="归属组织" prop="GWED101">
                    <el-input v-model="form.GWED101_NAME" readonly clearable @clear="clearGwed101">
                        <i class="el-icon-search el-input__icon" @click="openGwed101" slot="suffix"></i>
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="申请人员" prop="GWED001">
                    <el-input v-model="form.GWED001_NAME" readonly clearable @clear="clearGwed001">
                        <i class="el-icon-search el-input__icon" @click="openGwed001" slot="suffix"></i>
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="发票种类" prop="GWED002">
                    <el-select v-model="form.GWED002"  placeholder="请选择销售单位">
                        <el-option v-for="item in selectOptions.optionsGwed002"
                                   :key="item.code"
                                   :label="item.value"
                                   :value="item.code">
                        </el-option>
                    </el-select>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="归属法人" prop="GWEDMLEGAL">
                    <el-input v-model="form.GWEDMLEGAL_NAME" readonly clearable @clear="clearMlgeal">
                        <i class="el-icon-search el-input__icon" @click="openGwedmlegal" slot="suffix"></i>
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="ERP营运中心" prop="GWEDPLANT">
                    <el-input v-model="form.GWEDPLANT_NAME">

                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                <el-form-item label="备注">
                    <el-input type="textarea" v-model="form.GWED013"></el-input>
                </el-form-item>
            </el-col>
        </el-form>
    </el-row>
    <el-row>
        <div class="pos-re">
            <div class="pos-ab" style="margin-bottom: 10px;">
                <el-button type="primary" size="small" v-show="isAdd"
                           @click="addData">添加
                </el-button>
                <el-button type="primary" size="small" v-show="isAdd"
                           @click="del">删除
                </el-button>
            </div>
            <div class="table-responsive">
                <table id="gwei006_edit_table"
                       class="layui-table"
                       lay-size="sm"
                       lay-filter="gwei006_edit_table">
                </table>
            </div>
            <div style="float:right">
                <span style="font-size:16px;color:red">合计&nbsp;&nbsp;</span>
                <span><b>行数:</b>{{total.rows}}</span>
                <span><b>&nbsp;&nbsp;数量:</b>{{total.num}}</span>
                <span><b>&nbsp;&nbsp;金额:</b>{{total.sum}}</span>
            </div>
        </div>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right;margin-top: 10px;">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancle">关闭</el-button>
            <el-button v-show="isAdd" type="warning" icon="icon iconfont icon-21" size="mini"  @click="saveData">保存
            </el-button>
        </el-col>
    </el-row>
</el-main>
<script>
    require(["pc/crm/gwei006_edit"], $.noop);
</script>